package 开始的算法算法入门8月.双指针;
// https://leetcode-cn.com/problems/reverse-string/
public class 反转字符串344之0815 {
    public void reverseString(char[] s) {
        int start=0,end=s.length-1;
        while(start<=end){
            char tmp=s[start];
            s[start]=s[end];
            s[end]=tmp;
            start++;
            end--;

        }

        // int n=s.length;
        // for(int i=0;i<n/2;i++){
        // char temp=s[i];
        // s[i]=s[n-1-i];
        // s[n-1-i]=temp;
        // }

    }
}
